package manyText;

import java.util.Scanner;

//两个长方形对比大小
public class hanshu2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入两个整数,即长和宽");
        int a = sc.nextInt();
        int b = sc.nextInt();
        get1(a, b);

        System.out.println("请输入两个整数,即长和宽");
        int c = sc.nextInt();
        int d = sc.nextInt();
        get1(c, d);

        if (get1(a, b) > get1(c, d)) {
            System.out.println("第一个长方形较大");
        } else if (get1(a, b) < get1(c, d)) {
            System.out.println("第二个长方形较大");
        } else {
            System.out.println("两个长方形一样大");
        }
    }

    public static int get1(int a, int b) {
        int c = a * b;
        return c;
    }
}
